import  os,xlrd,arcpy,arcgisscripting,sys,DegreeConvert,xlwt

excelPath = 'E:\\PythonProjects\\africa2\\africa\\doc\\africa\\data\\pos2.xlsx'
excelFile=xlrd.open_workbook(excelPath)
sheet=excelFile.sheet_by_index(1)

workbook = xlwt.Workbook(encoding = 'ascii')
worksheet = workbook.add_sheet('sheet3')

for i in range(0,sheet.nrows):
    row = sheet.row_values(i)
    y = row[0].split(',')[0].split('a')[0]
    y_dir = row[0].split(',')[0].split('a')[-1]
    x = row[0].split(',')[1].split('a')[0]
    x_dir = row[0].split(',')[1].split('a')[-1]
    if y_dir.strip() =='S':
        y = -1*float(y)
    if x_dir.strip() =='W':
        x = -1*float(x)
    worksheet.write(i, 0, label=str(x))
    worksheet.write(i, 1, label=str(y))
workbook.save('E:\\PythonProjects\\africa2\\africa\\doc\\africa\\data\\getpos2.xls')